class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: D = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.r: A = None
        self.v: G = None
        self.y: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: G = None
        self.s: B = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: F = None
        self.t: F = None
        self.txt = txt

b = A("b")
k = B("k")
h = C("h")
f = D("f")
m = E("m")
i = F("i")
j = G("j")
g = D("g")
n = C("n")
l = E("l")

b.y = g
b.u = g
b.q = f
k.p = l
k.t = i
k.s = i
k.r = b
k.v = j
k.y = f
h.t = i
f.u = l
f.r = j
f.s = k
f.v = k
m.o = i
m.w = n
m.x = f
i.o = k
j.u = m
j.w = i
j.t = i
g.u = m
g.r = j
g.s = k
g.v = k
n.t = i
l.o = i
l.w = h
l.x = g
assert n.t.o.r.q.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: D = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.r: A = None
        self.v: G = None
        self.y: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: G = None
        self.s: B = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: F = None
        self.t: F = None
        self.txt = txt

b = A("b")
k = B("k")
h = C("h")
f = D("f")
m = E("m")
i = F("i")
j = G("j")
g = D("g")
n = C("n")
l = E("l")

b.y = g
b.u = g
b.q = f
k.p = l
k.t = i
k.s = i
k.r = b
k.v = j
k.y = f
h.t = i
f.u = l
f.r = j
f.s = k
f.v = k
m.o = i
m.w = n
m.x = f
i.o = k
j.u = m
j.w = i
j.t = i
g.u = m
g.r = j
g.s = k
g.v = k
n.t = i
l.o = i
l.w = h
l.x = g
assert n.t.o.r.q.txt == "f"