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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: C = None
        self.z: D = None
        self.p: G = None
        self.s: E = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: C = None
        self.z: D = None
        self.p: G = None
        self.s: E = None
        self.u: E = None
        self.txt = txt

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

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

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