class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: G = None
        self.p: G = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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