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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.u: F = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: G = None
        self.o: A = None
        self.x: E = None
        self.y: A = None
        self.p: B = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: A = None
        self.r: F = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: E = None
        self.v: G = None
        self.p: C = None
        self.w: D = None
        self.y: E = None
        self.txt = txt

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

m = A("m")
d = B("d")
h = C("h")
c = D("c")
l = E("l")
b = F("b")
k = G("k")
n = F("n")
f = E("f")

m.q = k
m.y = b
m.p = b
m.t = b
m.v = b
m.o = n
m.s = f
d.y = m
d.p = m
d.v = c
d.u = b
d.z = f
h.v = m
h.z = m
h.r = d
c.r = d
c.p = d
c.w = k
c.o = m
c.y = m
c.x = l
c.v = h
l.z = k
l.x = m
l.r = b
l.y = d
b.q = k
b.v = k
b.z = f
b.p = h
b.w = c
b.y = l
k.r = f
k.o = f
k.s = c
n.q = k
n.v = k
n.z = f
n.p = h
n.w = c
n.y = l
f.z = k
f.x = m
f.r = n
f.y = d
assert h.z.s.y.u.p.z.o.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: F = None
        self.o: F = None
        self.p: F = None
        self.s: E = None
        self.t: F = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.u: F = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: G = None
        self.o: A = None
        self.x: E = None
        self.y: A = None
        self.p: B = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: A = None
        self.r: F = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: E = None
        self.v: G = None
        self.p: C = None
        self.w: D = None
        self.y: E = None
        self.txt = txt

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

m = A("m")
d = B("d")
h = C("h")
c = D("c")
l = E("l")
b = F("b")
k = G("k")
n = F("n")
f = E("f")

m.q = k
m.y = b
m.p = b
m.t = b
m.v = b
m.o = n
m.s = f
d.y = m
d.p = m
d.v = c
d.u = b
d.z = f
h.v = m
h.z = m
h.r = d
c.r = d
c.p = d
c.w = k
c.o = m
c.y = m
c.x = l
c.v = h
l.z = k
l.x = m
l.r = b
l.y = d
b.q = k
b.v = k
b.z = f
b.p = h
b.w = c
b.y = l
k.r = f
k.o = f
k.s = c
n.q = k
n.v = k
n.z = f
n.p = h
n.w = c
n.y = l
f.z = k
f.x = m
f.r = n
f.y = d
assert h.z.s.y.u.p.z.o.z.z.txt == "k"