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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: F = None
        self.p: A = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: E = None
        self.q: A = None
        self.x: F = None
        self.w: A = None
        self.s: B = None
        self.u: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: F = None
        self.p: A = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: E = None
        self.q: A = None
        self.x: F = None
        self.w: A = None
        self.s: B = None
        self.u: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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