class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.s: H = None
        self.w: I = None
        self.v: H = None
        self.t: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: F = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.y: E = None
        self.w: E = None
        self.t: G = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: F = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.y: E = None
        self.w: E = None
        self.t: G = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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