class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: D = None
        self.r: B = None
        self.w: D = None
        self.z: G = None
        self.t: E = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: F = None
        self.w: A = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: F = None
        self.w: A = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

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

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