class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

g.p = i
k.x = j
k.y = j
k.q = g
k.t = b
k.s = a
k.u = f
a.u = n
a.x = f
a.r = g
a.t = g
a.v = j
j.o = h
i.v = j
f.p = j
b.u = a
b.o = g
b.y = g
n.x = j
n.y = j
n.q = g
n.t = b
n.s = a
n.u = f
h.p = j
assert f.p.o.p.o.p.o.p.txt == "
class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

g.p = i
k.x = j
k.y = j
k.q = g
k.t = b
k.s = a
k.u = f
a.u = n
a.x = f
a.r = g
a.t = g
a.v = j
j.o = h
i.v = j
f.p = j
b.u = a
b.o = g
b.y = g
n.x = j
n.y = j
n.q = g
n.t = b
n.s = a
n.u = f
h.p = j
assert f.p.o.p.o.p.o.p.txt == "j"