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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: A = None
        self.y: E = None
        self.p: C = None
        self.v: D = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: F = None
        self.t: D = None
        self.txt = txt

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

b = A("b")
g = B("g")
d = C("d")
j = D("j")
f = E("f")
l = F("l")
m = E("m")
n = E("n")

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: A = None
        self.y: E = None
        self.p: C = None
        self.v: D = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: F = None
        self.t: D = None
        self.txt = txt

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

b = A("b")
g = B("g")
d = C("d")
j = D("j")
f = E("f")
l = F("l")
m = E("m")
n = E("n")

b.s = m
b.r = l
b.u = j
b.p = d
b.t = g
g.w = n
g.u = b
g.o = b
g.y = f
g.p = d
g.v = j
d.y = g
d.r = b
j.s = l
j.r = d
f.q = m
f.r = l
f.t = j
l.z = n
l.u = j
m.q = n
m.r = l
m.t = j
n.q = f
n.r = l
n.t = j
assert b.p.y.y.t.txt == "j"