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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: B = None
        self.v: C = None
        self.q: F = None
        self.x: D = None
        self.z: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: B = None
        self.v: C = None
        self.q: F = None
        self.x: D = None
        self.z: E = None
        self.r: A = None
        self.txt = txt

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

e.x = c
e.o = l
n.y = j
n.z = j
n.x = j
n.o = h
n.v = l
n.p = g
n.s = e
g.o = b
g.p = b
g.r = b
g.s = h
g.t = f
b.p = l
b.u = j
b.r = j
j.t = c
j.s = b
l.o = b
l.p = h
l.u = e
f.p = g
f.v = g
f.t = h
f.q = l
f.x = b
f.z = j
f.r = c
h.y = j
h.z = j
h.x = j
h.o = n
h.v = l
h.p = g
h.s = c
c.x = e
c.o = l
assert h.p.o.r.s.txt == "b"