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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.w: B = None
        self.y: F = None
        self.q: A = None
        self.txt = txt

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

b = A("b")
n = B("n")
g = C("g")
e = D("e")
c = E("c")
j = F("j")

b.o = j
n.p = j
n.t = e
n.z = e
n.s = c
g.r = c
g.w = b
g.v = e
g.z = j
g.o = j
g.s = j
e.o = c
e.z = c
e.r = b
e.w = b
e.y = n
e.s = j
c.z = e
c.t = b
c.q = b
c.w = n
c.y = j
j.z = e
j.w = e
j.q = n
j.p = b
j.r = c
assert n.p.q.s.z.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.w: B = None
        self.y: F = None
        self.q: A = None
        self.txt = txt

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

b = A("b")
n = B("n")
g = C("g")
e = D("e")
c = E("c")
j = F("j")

b.o = j
n.p = j
n.t = e
n.z = e
n.s = c
g.r = c
g.w = b
g.v = e
g.z = j
g.o = j
g.s = j
e.o = c
e.z = c
e.r = b
e.w = b
e.y = n
e.s = j
c.z = e
c.t = b
c.q = b
c.w = n
c.y = j
j.z = e
j.w = e
j.q = n
j.p = b
j.r = c
assert n.p.q.s.z.s.txt == "j"