class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: D = None
        self.t: C = None
        self.u: G = None
        self.v: E = None
        self.r: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: E = None
        self.x: A = None
        self.w: C = None
        self.y: E = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

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

m = A("m")
j = B("j")
g = C("g")
h = D("h")
i = E("i")
a = F("a")
d = G("d")
b = F("b")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: E = None
        self.x: A = None
        self.w: C = None
        self.y: E = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

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

m = A("m")
j = B("j")
g = C("g")
h = D("h")
i = E("i")
a = F("a")
d = G("d")
b = F("b")

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