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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

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