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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.z: A = None
        self.t: B = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: F = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

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

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

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

m.w = j
m.s = j
m.r = i
m.u = f
m.z = e
f.x = i
f.t = g
f.q = e
g.v = f
g.t = f
g.q = f
g.w = j
g.s = j
g.z = m
e.t = i
e.s = i
e.o = c
e.v = g
j.w = i
j.o = m
j.x = e
i.t = g
c.w = j
c.s = j
c.r = i
c.u = f
c.z = e
d.w = j
d.s = j
d.r = i
d.u = f
d.z = e
assert g.w.o.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: F = None
        self.u: B = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.z: A = None
        self.t: B = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: F = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

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

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

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

m.w = j
m.s = j
m.r = i
m.u = f
m.z = e
f.x = i
f.t = g
f.q = e
g.v = f
g.t = f
g.q = f
g.w = j
g.s = j
g.z = m
e.t = i
e.s = i
e.o = c
e.v = g
j.w = i
j.o = m
j.x = e
i.t = g
c.w = j
c.s = j
c.r = i
c.u = f
c.z = e
d.w = j
d.s = j
d.r = i
d.u = f
d.z = e
assert g.w.o.r.t.txt == "g"