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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.txt = txt

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

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

c = A("c")
k = B("k")
b = C("b")
d = D("d")
f = E("f")
j = F("j")
g = A("g")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.txt = txt

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

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

c = A("c")
k = B("k")
b = C("b")
d = D("d")
f = E("f")
j = F("j")
g = A("g")

c.s = b
c.r = g
c.y = j
c.v = k
k.p = d
k.w = c
b.t = k
b.u = k
b.y = j
d.v = k
d.t = c
f.t = b
f.q = d
f.v = d
f.x = d
f.o = k
j.s = g
j.y = b
j.p = f
j.r = k
j.z = d
g.s = b
g.r = c
g.y = j
g.v = k
assert f.t.y.r.p.t.txt == "c"