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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: D = None
        self.r: B = None
        self.v: E = None
        self.txt = txt

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

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

e = A("e")
h = B("h")
c = C("c")
m = D("m")
k = E("k")
f = F("f")
j = D("j")

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: D = None
        self.r: B = None
        self.v: E = None
        self.txt = txt

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

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

e = A("e")
h = B("h")
c = C("c")
m = D("m")
k = E("k")
f = F("f")
j = D("j")

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