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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: C = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: C = None
        self.z: E = None
        self.v: B = None
        self.o: C = None
        self.txt = txt

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

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

i.w = e
i.z = e
c.s = g
c.o = g
c.p = j
j.q = c
j.z = g
j.o = i
j.w = m
j.p = m
e.u = j
e.o = h
h.y = g
h.z = g
h.q = j
h.o = j
h.v = c
m.r = h
m.z = j
m.w = j
m.p = i
m.s = i
m.x = c
g.y = h
g.z = h
g.q = j
g.o = j
g.v = c
assert g.z.z.v.p.o.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: C = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: C = None
        self.z: E = None
        self.v: B = None
        self.o: C = None
        self.txt = txt

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

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

i.w = e
i.z = e
c.s = g
c.o = g
c.p = j
j.q = c
j.z = g
j.o = i
j.w = m
j.p = m
e.u = j
e.o = h
h.y = g
h.z = g
h.q = j
h.o = j
h.v = c
m.r = h
m.z = j
m.w = j
m.p = i
m.s = i
m.x = c
g.y = h
g.z = h
g.q = j
g.o = j
g.v = c
assert g.z.z.v.p.o.w.u.txt == "j"