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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: E = None
        self.u: E = None
        self.t: C = None
        self.y: F = None
        self.v: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: D = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: F = None
        self.y: F = None
        self.r: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: E = None
        self.u: E = None
        self.t: C = None
        self.y: F = None
        self.v: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: D = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: F = None
        self.y: F = None
        self.r: F = None
        self.x: F = None
        self.txt = txt

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

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