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

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

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

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

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

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

f = A("f")
a = B("a")
m = C("m")
c = D("c")
j = E("j")
i = F("i")
n = A("n")
h = F("h")
b = F("b")
g = D("g")

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

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

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

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

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

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

f = A("f")
a = B("a")
m = C("m")
c = D("c")
j = E("j")
i = F("i")
n = A("n")
h = F("h")
b = F("b")
g = D("g")

f.o = i
a.t = j
a.o = j
a.w = g
a.x = c
a.s = n
m.r = j
c.s = m
c.o = m
c.t = a
c.x = a
c.p = a
c.q = f
j.y = a
i.s = j
i.o = m
i.r = a
i.z = a
i.v = c
n.o = b
h.s = j
h.o = m
h.r = a
h.z = a
h.v = g
b.s = j
b.o = m
b.r = a
b.z = a
b.v = c
g.s = m
g.o = m
g.t = a
g.x = a
g.p = a
g.q = n
assert c.s.r.y.x.p.txt == "a"