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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.u: F = None
        self.o: A = None
        self.q: G = None
        self.w: A = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: A = None
        self.t: C = None
        self.w: G = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.u: F = None
        self.o: A = None
        self.q: G = None
        self.w: A = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: A = None
        self.t: C = None
        self.w: G = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

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

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

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

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