class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: I = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: H = None
        self.r: C = None
        self.p: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: A = None
        self.p: C = None
        self.y: C = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: A = None
        self.u: I = None
        self.x: D = None
        self.t: E = None
        self.v: I = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: I = None
        self.r: A = None
        self.o: H = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.z: I = None
        self.v: F = None
        self.o: A = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: C = None
        self.w: G = None
        self.q: D = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: H = None
        self.r: C = None
        self.p: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: A = None
        self.p: C = None
        self.y: C = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: A = None
        self.u: I = None
        self.x: D = None
        self.t: E = None
        self.v: I = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: I = None
        self.r: A = None
        self.o: H = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.z: I = None
        self.v: F = None
        self.o: A = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: C = None
        self.w: G = None
        self.q: D = None
        self.r: A = None
        self.txt = txt

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

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