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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: A = None
        self.v: E = None
        self.y: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: A = None
        self.v: E = None
        self.y: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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