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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: C = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: C = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

j.z = c
j.w = c
j.y = c
j.p = b
j.q = m
g.z = j
h.y = c
c.s = j
c.r = g
c.y = i
m.y = j
m.r = b
m.o = c
m.t = c
i.u = f
b.y = c
f.z = c
f.w = c
f.y = c
f.p = h
f.q = m
n.u = j
assert h.y.y.u.q.y.q.t.s.y.txt == "c"